package itheima.d08;

public class Test {
    public  static void swimGame(ISwimming player){
        Player p = new Player();
        p.swim();
    }
    public static void main(String[] args) {
        swimGame(new ISwimming() {
            @Override
            public Player createPlayer() {
                return new Player("小鸡",12);
            }


        });
//        swimGame((name,age)->new Player(name, age));
    }
}
